package com.zhuss.enums;

import java.util.List;

/**
 * @author summer
 * @date 2020/12/30 9:44
 */
public enum SiteType implements  BaseEnum {
    公交站(10,"公交站","gjz"),
    小区门口(20,"小区门口","xqmk"),
    厂门口(30,"厂门口","cmk"),
    ;

    Integer key;

    String value;

    String tag;

    SiteType(Integer key,String value,String tag) {
        this.key = key;
        this.value = value;
        this.tag = tag;
    }

    public Boolean sameKey(Integer key) {
        return this.key.equals(key);
    }

    public Integer key() {
        return key;
    }

    public String value() {
        return value;
    }

    public String tag() {
        return tag;
    }

    public String data() {
        return value;
    }

    @Override
    public List<Integer> removeIdList() {
        // TODO Auto-generated method stub
        return null;
    }

    @Override
    public Boolean sameValue(String value) {
        return this.value.equals(value);
    }

    public static String getValue(Integer type) {
        SiteType[] siteTypeEnums = values();
        for (SiteType siteType : siteTypeEnums) {
            if (siteType.key().equals(type)) {
                return siteType.value();
            }
        }
        return null;
    }

    public static String getTag(Integer type) {
        SiteType[] siteTypeEnums = values();
        for (SiteType siteType : siteTypeEnums) {
            if (siteType.key().equals(type)) {
                return siteType.tag();
            }
        }
        return null;
    }
}
